package StudyCode.summary.mycollection;

import java.util.Arrays;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReplaceValueInArray {
	public static void main(String[] argv) {
		int[] arr = new int[]{34, 35, 36, 37, 37, 37, 67, 68, 69};
		int startIndex = 2;
		int endIndex = 2;
		int value = 2;
		System.out.println(java.util.Arrays.toString(replaceArray(arr,
				startIndex, endIndex, value)));
	}

	public static int[] replaceArray(int[] arr, int startIndex,
	                                 int endIndex, int value) {
		Arrays.fill(arr, startIndex, endIndex, value);
		return arr;
	}
}
